package com.macro.mall.demo.design.pattern.observer;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class ConcreteSubject implements Subject{

    private List<Observer> observers = new ArrayList<>();
    private String state;
    @Override
    public void registerObserver(Observer observer) {

    }

    @Override
    public void removeObserver(Observer observer) {

    }

    @Override
    public void notifyObservers(String message) {

    }

    public void setState(String state) {
        this.state = state;
        notifyObservers(state);
    }

}
